"""
print("Hello World")
# 引号的使用，单引号、双引号、三引号（多行注释使用）
print("select * from tb where name='Jerry'")

# 输出变量的值
aip = "192.168.7.22"
print(aip) # 输出变量值
print("aip") # 输出IP

# 用一个变量事先必须得先声明

# ping -c 192.168.7.22
print("ping -c 1",aip)

#print输出支持占位符
# %s 字符串
# %d 整数
# %f 浮点数
name = "王旭东"
ip = "192.168.7.22"
print("my name is %s" % name)
print("select * from table where user=%s" % name)

# ssh用户IP
print("ssh %s@%s" % (name, ip))

print("数字: %d" % 89)
print("数字: %d" % 3.123412)
print("浮点数: %f" %3.12312)
print("浮点数: %.2f" %3.12312)
"""
hostname = "wordpress.linux.com"
ip = "192.168.7.22"
user = "admin"
password = "DD.08.dd"
hostuptime = 10.22234
print("主机名%s\nIP地址为%s\n用户为%s\n密码是%s\n主机负载为%.2f%%" % (hostname,ip,user,password,hostuptime))
